# 导包
import time
import unittest
import HTMLTestRunner_PY3
import app

# 创建测试套件
from script.test_employee_params import TestLoginParams
from script.test_login_params import TestLogin

suite = unittest.TestSuite()
# 将测试用例添加到测试套件
suite.addTest(unittest.makeSuite(TestLoginParams))
suite.addTest(unittest.makeSuite(TestLogin))
# 使用HTMLTestRunner生成测试报告
report_filename = app.BASE_DIR + "/report/ihrm{}.html".format(time.strftime("%Y%m%d %H%M%S"))
with open(report_filename, mode="wb") as f:
    # 实例化runner
    runner = HTMLTestRunner_PY3.HTMLTestRunner(f)
    # 使用runner运行测试套件
    runner.run(suite)
print("测试改变后的代码","a"*50)